package com.mengshu.platform.po;

import com.baomidou.mybatisplus.annotation.TableName;
import com.mengshu.mybatisplus.annotations.UniqueKey;
import com.mengshu.mybatisplus.basic.BasicPO;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;

/**
 * <p>
 *     用户表
 * </p>
 *
 * @author liuning
 * @date 4:05 下午 2022/2/2
 */
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@TableName(value = "admin_user", autoResultMap = true)
public class AdminUserPO extends BasicPO implements Serializable {
    private static final long serialVersionUID = 4511070875585500333L;

    // 用户名
    @UniqueKey(message ="用户名已存在")
    @NotBlank(message = "用户名不能为空")
    private String name;

    // 密码
    private String password;

    // 盐
    private String salt;

    // 是否可用
    private Boolean enable = true;
}
